﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/TeacherMasterPage.master" AutoEventWireup="true" CodeFile="stuexam.aspx.cs" Inherits="Manage_stuexam" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="grid" border="0" cellspacing="0" cellpadding="0" width="100%">
        <thead>
            <tr>
                <th><%= Resources.labels.StudentList%></th>
            </tr>
        </thead>
        <tbody>
        <tr>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <%= Resources.labels.Department%>：<asp:DropDownList ID="ddltept" runat="server">
                </asp:DropDownList>
                <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;
                <%= Resources.labels.stuName%>(or <%= Resources.labels.stuNumber%>)：<asp:TextBox ID="keywordTb"  width=140px  runat="server" Text="" ></asp:TextBox>
                <asp:Button ID="btnSearch" CssClass="button" runat="server" Text="查询" onclick="btnSearch_Click" />
            </td>
        </tr>
        <tr><td>
            <table class="grid" border="0" cellspacing="0" cellpadding="0" width="100%">
                <thead>
                    <tr>
                        <th width="10%"><%= Resources.labels.stuNumber%></th>
                        <th width="10%"><%= Resources.labels.stuName%></th>
                        <th width=""><%= Resources.labels.Department%></th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                <asp:Repeater ID="rp" runat="server" EnableViewState=false 
                        onitemdatabound="rp_ItemDataBound">
                <ItemTemplate>
                    <tr>
                        <td><a  href="javascript:void(0);" onclick="getstuexamlist('<%# Eval("StudentID")%>')"><%# Eval("StudentNumber")%></a></td>
                        <td><a href='javascript:void(0);'  onclick="getstuexamlist('<%# Eval("StudentID")%>')"><%# Eval("StudentName")%></a></td>
                        <td><%# getDepart(Eval("DepartmentID").ToString().Trim())%></td>
                        <td></td>
                    </tr>
                </ItemTemplate>
                </asp:Repeater>    
                </tbody>
                <tfoot>
    	            <tr>
    	                <td align=left  colspan=4 >
    	                    <webdiyer:aspnetpager id="AspNetPager1" runat="server" 
    	                    EnableViewState="True"
    	                    horizontalalign="Center" 
    	                    PagingButtonSpacing="8px" 
                            showcustominfosection="Left" 
                            urlpaging="false" width="100%" 
                            ImagePath="~/images" 
                            NumericButtonType="Text" 
                            ButtonImageExtension="gif" 
                            ButtonImageNameExtension="n" 
                            DisabledButtonImageNameExtension="g" 
                            ShowNavigationToolTip="true" 
                            FirstPageText="首页" 
                            LastPageText="尾页" NextPageText="下一页" PageSize="20" 
                            PrevPageText="上一页" SubmitButtonText="跳转" 
                                onpagechanged="AspNetPager1_PageChanged"></webdiyer:aspnetpager>
    	                </td>
    	            </tr>
                </tfoot>
            </table>
          </td></tr>
        </tbody>
    </table>
    <DIV id="DivEditContainer" style="DISPLAY: none;" >
        <DIV style="DISPLAY: block;padding:5px;" id=DIV4 >
        <div id="DivList"><span class="loadicon"><%= Resources.labels.PleaseWaiting%></span></div>
        </DIV>
    </DIV>
<script>
    function getstuexamlist(_id) {
        $('#DivEditContainer').modal({
            opacity: 55, zIndex: 10, minHeight: 450,
            onOpen: function (dialog) {
                getStuScore(_id);
                dialog.overlay.fadeIn('slow', function () {
                    dialog.data.hide();
                    dialog.container.fadeIn('fast', function () {
                        dialog.data.show(); //slideDown('slow');
                    });
                });
            }
        });
    }
    function getStuScore(_id) {
        $.ajax({
            type: "get",
            cache: false,
            url: "Service/getStuScore.aspx?id=" + _id,
            success: function (msg) {
                $("#DivList").html(msg);
            },
            error: function (msg) {
                $("#DivList").html("<%= Resources.labels.GetInfoFail%>");
            }
        });
    }
</script>
</asp:Content>

